\(\int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx\) [541]

   Optimal result
   Rubi [A] (verified)
   Mathematica [F]
   Maple [F]
   Fricas [F]
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 201 \[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\frac {2 c x^{1+m} (e+f x)^n \left (1+\frac {f x}{e}\right )^{-n} \operatorname {AppellF1}\left (1+m,-n,1,2+m,-\frac {f x}{e},-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right ) (1+m)}-\frac {2 c x^{1+m} (e+f x)^n \left (1+\frac {f x}{e}\right )^{-n} \operatorname {AppellF1}\left (1+m,-n,1,2+m,-\frac {f x}{e},-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right ) (1+m)} \]

[Out]

2*c*x^(1+m)*(f*x+e)^n*AppellF1(1+m,1,-n,2+m,-2*c*x/(b-(-4*a*c+b^2)^(1/2)),-f*x/e)/(1+m)/((1+f*x/e)^n)/(b-(-4*a
*c+b^2)^(1/2))/(-4*a*c+b^2)^(1/2)-2*c*x^(1+m)*(f*x+e)^n*AppellF1(1+m,1,-n,2+m,-2*c*x/(b+(-4*a*c+b^2)^(1/2)),-f
*x/e)/(1+m)/((1+f*x/e)^n)/(-4*a*c+b^2)^(1/2)/(b+(-4*a*c+b^2)^(1/2))

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {925, 140, 138} \[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\frac {2 c x^{m+1} (e+f x)^n \left (\frac {f x}{e}+1\right )^{-n} \operatorname {AppellF1}\left (m+1,-n,1,m+2,-\frac {f x}{e},-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{(m+1) \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )}-\frac {2 c x^{m+1} (e+f x)^n \left (\frac {f x}{e}+1\right )^{-n} \operatorname {AppellF1}\left (m+1,-n,1,m+2,-\frac {f x}{e},-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{(m+1) \sqrt {b^2-4 a c} \left (\sqrt {b^2-4 a c}+b\right )} \]

[In]

Int[(x^m*(e + f*x)^n)/(a + b*x + c*x^2),x]

[Out]

(2*c*x^(1 + m)*(e + f*x)^n*AppellF1[1 + m, -n, 1, 2 + m, -((f*x)/e), (-2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(Sqrt[
b^2 - 4*a*c]*(b - Sqrt[b^2 - 4*a*c])*(1 + m)*(1 + (f*x)/e)^n) - (2*c*x^(1 + m)*(e + f*x)^n*AppellF1[1 + m, -n,
 1, 2 + m, -((f*x)/e), (-2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]*(b + Sqrt[b^2 - 4*a*c])*(1 + m)*(
1 + (f*x)/e)^n)

Rule 138

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[c^n*e^p*((b*x)^(m +
 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 140

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[c^IntPart[n]*((c +
d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]), Int[(b*x)^m*(1 + d*(x/c))^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d
, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !GtQ[c, 0]

Rule 925

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n, 1/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x
] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] &&  !IntegerQ[m] &&  !IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {2 c x^m (e+f x)^n}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}+2 c x\right )}-\frac {2 c x^m (e+f x)^n}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}+2 c x\right )}\right ) \, dx \\ & = \frac {(2 c) \int \frac {x^m (e+f x)^n}{b-\sqrt {b^2-4 a c}+2 c x} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c) \int \frac {x^m (e+f x)^n}{b+\sqrt {b^2-4 a c}+2 c x} \, dx}{\sqrt {b^2-4 a c}} \\ & = \frac {\left (2 c (e+f x)^n \left (1+\frac {f x}{e}\right )^{-n}\right ) \int \frac {x^m \left (1+\frac {f x}{e}\right )^n}{b-\sqrt {b^2-4 a c}+2 c x} \, dx}{\sqrt {b^2-4 a c}}-\frac {\left (2 c (e+f x)^n \left (1+\frac {f x}{e}\right )^{-n}\right ) \int \frac {x^m \left (1+\frac {f x}{e}\right )^n}{b+\sqrt {b^2-4 a c}+2 c x} \, dx}{\sqrt {b^2-4 a c}} \\ & = \frac {2 c x^{1+m} (e+f x)^n \left (1+\frac {f x}{e}\right )^{-n} F_1\left (1+m;-n,1;2+m;-\frac {f x}{e},-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right ) (1+m)}-\frac {2 c x^{1+m} (e+f x)^n \left (1+\frac {f x}{e}\right )^{-n} F_1\left (1+m;-n,1;2+m;-\frac {f x}{e},-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right ) (1+m)} \\ \end{align*}

Mathematica [F]

\[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx \]

[In]

Integrate[(x^m*(e + f*x)^n)/(a + b*x + c*x^2),x]

[Out]

Integrate[(x^m*(e + f*x)^n)/(a + b*x + c*x^2), x]

Maple [F]

\[\int \frac {x^{m} \left (f x +e \right )^{n}}{c \,x^{2}+b x +a}d x\]

[In]

int(x^m*(f*x+e)^n/(c*x^2+b*x+a),x)

[Out]

int(x^m*(f*x+e)^n/(c*x^2+b*x+a),x)

Fricas [F]

\[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\int { \frac {{\left (f x + e\right )}^{n} x^{m}}{c x^{2} + b x + a} \,d x } \]

[In]

integrate(x^m*(f*x+e)^n/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

integral((f*x + e)^n*x^m/(c*x^2 + b*x + a), x)

Sympy [F(-1)]

Timed out. \[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\text {Timed out} \]

[In]

integrate(x**m*(f*x+e)**n/(c*x**2+b*x+a),x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\int { \frac {{\left (f x + e\right )}^{n} x^{m}}{c x^{2} + b x + a} \,d x } \]

[In]

integrate(x^m*(f*x+e)^n/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

integrate((f*x + e)^n*x^m/(c*x^2 + b*x + a), x)

Giac [F]

\[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\int { \frac {{\left (f x + e\right )}^{n} x^{m}}{c x^{2} + b x + a} \,d x } \]

[In]

integrate(x^m*(f*x+e)^n/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

integrate((f*x + e)^n*x^m/(c*x^2 + b*x + a), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {x^m (e+f x)^n}{a+b x+c x^2} \, dx=\int \frac {x^m\,{\left (e+f\,x\right )}^n}{c\,x^2+b\,x+a} \,d x \]

[In]

int((x^m*(e + f*x)^n)/(a + b*x + c*x^2),x)

[Out]

int((x^m*(e + f*x)^n)/(a + b*x + c*x^2), x)